/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author Cheng
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '/@/api/model/baseModel';

const { adminPath } = useGlobSetting();

export interface InEnterpriseTask extends BasicModel<InEnterpriseTask> {
  name?: string; // 任务名称
  enterpriseCode?: string; // 所属企业code
  enterpriseName?: string; // 所属企业名称
  regionId?: string; // 区域id
  regionName?: string; // 区域名称
  roleCode?: string; // 角色code
  roleName?: string; // 角色名称
  remark?: string; // 任务要求
  content?: string; // 任务内容
  taskTypeCode?: string; // 任务类型code
  taskTypeName?: string; // 任务类型名称
  timeRange?: string; // 时间段json串
  addTime?: string; // 添加时间
  updateTime?: string; // 更新时间
  deleted?: string; // 是否删除
}

export const inEnterpriseTaskList = (params?: InEnterpriseTask | any) =>
  defHttp.get<InEnterpriseTask>({ url: adminPath + '/inspectionmanag/inEnterpriseTask/list', params });

export const inEnterpriseTaskListData = (params?: InEnterpriseTask | any) =>
  defHttp.post<Page<InEnterpriseTask>>({ url: adminPath + '/inspectionmanag/inEnterpriseTask/listData', params });

export const inEnterpriseTaskForm = (params?: InEnterpriseTask | any) =>
  defHttp.get<InEnterpriseTask>({ url: adminPath + '/inspectionmanag/inEnterpriseTask/form', params });

export const inEnterpriseTaskSave = (params?: any, data?: InEnterpriseTask | any) =>
  defHttp.post<InEnterpriseTask>({ url: adminPath + '/inspectionmanag/inEnterpriseTask/save', params, data });

export const inEnterpriseTaskDelete = (params?: InEnterpriseTask | any) =>
  defHttp.get<InEnterpriseTask>({ url: adminPath + '/inspectionmanag/inEnterpriseTask/delete', params });
